<template>  
    <div class="home">
        <h1>Home</h1>
    </div>
</template>

<script setup lang="ts" name = "Home">
    import { onMounted } from 'vue';
    import { useRouter } from 'vue-router';

    //  负责整个路由管理的路由器
    const router = useRouter();
    onMounted(() => {
        console.log('Home');

        setTimeout(() => {
            console.log('onMounted home');
            router.push({
                name: 'News',
            });

        }, 5000);
    });

</script>


<style scoped>
.home  {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}
</style>
